#include "link_list.h"

int main()
{
    //定义头节点
    node_t* phead = NULL;
    create_node(&phead, -1);

    //头插法插入数据
    insert_from_link_by_head(phead, 100);
    insert_from_link_by_head(phead, 200);
    insert_from_link_by_head(phead, 300);
    insert_from_link_by_head(phead, 400);
    show_data(phead);
    //尾插法插入数据
    insert_from_link_by_tail(phead, 500);
    show_data(phead);
    //头删法插入数据
    delete_from_list_by_head(phead);
    show_data(phead);
    delete_from_link_by_pos(phead, 3);
    show_data(phead);
    //排序
    sort_link(phead);
    show_data(phead);

    return 0;
}